﻿using System.Web;
using System.Web.Optimization;

namespace Monitor
{
    public class BundleConfig
    {
        // Дополнительные сведения о Bundling см. по адресу http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {

            #region Стили

            bundles.Add(new StyleBundle("~/Content/theme").Include(
                "~/Content/jqwidgets/jqx.base.css",
                "~/Content/jqwidgets/jqx.office.css",
                "~/Content/MainStyle.css",
                "~/Content/Icon.css"
                ));
            bundles.Add(new StyleBundle("~/Content/admin/user").Include(
                "~/Content/administrator/user.css"
                ));

            #endregion

            #region Скрипты

            #region общие

            bundles.Add(new ScriptBundle("~/Scripts/UsefullFunction").Include(
                "~/Scripts/Function/UsefullFunction.js"
                            ));

            bundles.Add(new ScriptBundle("~/Scripts/datetime").Include(
                "~/Scripts/jqx-all/globalization/jquery.global.js",
                "~/Scripts/jqx-all/globalization/jquery.glob.ru-RU.js"
                ));

            #endregion

            #region HomeController

            bundles.Add(new ScriptBundle("~/Scripts/home/Report").Include(
                "~/Scripts/jquery.fileDownload.js",
                "~/Scripts/HomeController/Report.js"
                ));
            bundles.Add(new ScriptBundle("~/Scripts/home/MapView").Include(
                "~/Scripts/map/jsMap.js",
                "~/Scripts/HomeController/MapView.js"
                ));
            bundles.Add(new ScriptBundle("~/Scripts/home/ArchiveState").Include(
                "~/Scripts/jqx-all/jqxgrid.export.js",
                "~/Scripts/HomeController/ArchiveState.js"
                ));

            #endregion

            #region AccountController

            bundles.Add(new ScriptBundle("~/Scripts/user/usertreemanager").Include(
                "~/Scripts/Account/UserTreeManager.js"
                ));
            bundles.Add(new ScriptBundle("~/Scripts/user/userareamanager").Include(
                "~/Scripts/Account/UserAreaManager.js"
                ));

            #endregion

            
            #region AdministratorController

            bundles.Add(new ScriptBundle("~/Scripts/admin/bak").Include(
                "~/Scripts/Administrator/Bak.js"
                ));
            bundles.Add(new ScriptBundle("~/Scripts/admin/car").Include(
                "~/Scripts/Administrator/Car.js"
                ));
            bundles.Add(new ScriptBundle("~/Scripts/admin/Classificator").Include(
                "~/Scripts/Administrator/Classificator.js"
                ));

            bundles.Add(new ScriptBundle("~/Scripts/admin/user").Include(
                "~/Scripts/Administrator/UserPartial/DeleteDialog.js",
                "~/Scripts/Administrator/UserPartial/MainTable.js",
                "~/Scripts/Administrator/UserPartial/NewUser.js",
                "~/Scripts/Administrator/User.js"
                ));

            #endregion


            #endregion

            //оптимизация сборок
            BundleTable.EnableOptimizations = true;
            
        }
    }
}